<template>
	<view class="">
		<view class="placeholder" :style="{
			height: `${menuInfo.contentTop}px`,
		}">
		</view>
		<view class="navbar-frame" :style="{
			height: `${menuInfo.contentTop}px`,
			boxShadow: `0 0 3px -1px rgba(100, 100, 100, ${opacity})`
		}">
			<view 	class="navbar-content" 
					:style="{
						top: `${menuInfo.menuTop}px`,
						height: `${menuInfo.menuHeight}px`,
					}">
				<view class="icon-switch" @click="back">
					<uv-icon name="arrow-left" color="#fff"></uv-icon>
				</view>
				捏脸列表
			</view>
		</view>
	</view>
</template>

<script>
	const app = getApp()
	export default {
		name:"navbar",
		data() {
			return {
				menuInfo: app.globalData.menuInfo
			};
		},
		props: {
			opacity: {
				type: Number,
				default: 1
			}
		},
		watch: {
			opacity() {}
		},
		mounted() {
		},
		methods: {
			back() {
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.navbar-frame {
		position: fixed;
		width: 100%;
		top: 0;
		left: 0;
		z-index: 10;
		background-color: #333;
		.navbar-content {
			width: 100%;
			position: absolute;
			left: 0;
			display: flex;
			border-radius: 999px;
			overflow: hidden;
			justify-content: center;
			align-items: center;
			color: #fff;
			font-size: 14px;
			.icon-switch {
				height: calc(100%);
				width: 30px;
				display: flex;
				justify-content: center;
				align-items: center;
				position: absolute;
				top: 50%;
				left: 30rpx;
				transform: translateY(-50%);
			}
		}
	}
</style>